package com.hqyj.demo.mapper;


import com.hqyj.demo.entity.Goodstype;
import com.hqyj.demo.entity.Purchase;
import com.hqyj.demo.entity.Goods;
import com.hqyj.demo.entity.PurchaseGoods;
import com.hqyj.demo.entity.vo.PurchaseVo;
import java.util.List;

public interface PurchaseMapper {

    //查询所有单据信息
    List<Purchase> selectAll();

    //模糊分页查询
    List<Purchase> selectPageLike(PurchaseVo purchaseVo);
    //总记录数
    Integer selectCount();

    //根据ID查询单据详细信息
    Purchase selectByID(Integer id);

    //根据时间查询当天入库单据记录数
    Integer byDateCount(String nowDate);

    //获取分层级类型
    //List<Goodstype> selectTypeOfTier(Integer pid);

    //保存单据对象
    Boolean savePurchase(Purchase purchase);
    //获取单据表最后一条记录ID
    Integer selectPurchaseLastId();
    //添加单据商品中间表
    Integer savePurchaseGoods(List<PurchaseGoods> list);
    //批量修改商品库存
    Integer updateGoodsInventoryQuantity(List<Goods> list);
    //单个修改商品库存
    Boolean updateGoodsInventoryQuantityById(Goods goods);

}
